package com.fst.dsi.lib.domain.entity;

import java.io.Serializable;
import java.lang.String;
import java.sql.Date;
import java.util.List;

import javax.persistence.*;

import com.dnr.arch.kernel.model.AbstractValue;
import com.dnr.arch.kernel.model.Value;

/**
 * Entity implementation class for Entity: Student
 *
 */
@Entity
@Table(name="student")
public class Student extends AbstractValue implements Serializable, Value {

	@Id
	@Column(name="id_", unique=true, nullable=false) 
	private long id; 
	
	@Column(name="cin_", unique=true, nullable=false)
	private int cin; 
	
	@Column(name="firstname_", nullable=false)
	private String firstName; 
	
	@Column(name="lastname_", nullable=false)
	private String lastName; 
	
	@Column(name="studentcardcode_", unique=true, nullable=false)
	private int studentCardCode; 
	
	@Column(name="photo_", nullable=false)
	private String photo; 
	
	@Column(name="dateofbirth_", nullable=false)
	private Date dateOfBirth;
	
	//bi-directional many-to-one association to Book
	@OneToMany(mappedBy="student")
	private List<BookOperation> bookOperation;
	
	private static final long serialVersionUID = 1L;
	
	public Student() {
		super();
	} 
	   
	public long getId() {
 		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}
	   
	public int getCin() {
 		return this.cin;
	}

	public void setCin(int cin) {
		this.cin = cin;
	}
	   
	public String getFirstName() {
 		return this.firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	   
	public String getLastName() {
 		return this.lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	   
	public int getStudentCardCode() {
 		return this.studentCardCode;
	}

	public void setStudentCardCode(int studentCardCode) {
		this.studentCardCode = studentCardCode;
	}
	   
	public String getPhoto() {
 		return this.photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}
	   
	public Date getDateOfBirth() {
 		return this.dateOfBirth;
	}

	public void setDateOfBirth(Date dateOfBirth) {
		this.dateOfBirth = dateOfBirth;
	}
	
	public List<BookOperation> getBookOperations() {
		return this.bookOperation;
	}
	
	public void setBooks(List<BookOperation> bookOperations) {
		this.bookOperation = bookOperations;
	}
	
   
}
